package com.wewoo.log4e.core.spring.boot.autoconfigure;

import com.wewoo.log4e.core.executor.LogExecutor;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @ClassName Log4eProperties
 * @Description TODO
 * @Author tangjin
 * @Date 16:05 2022/2/14
 **/
@Getter
@Setter
@ConfigurationProperties(prefix = "log4e")
public class Log4eProperties {
    /**
     * log level
     */
    private String level;

    /**
     * default executor , if The default executor is not set and default container is the first one
     */
    private Class<? extends LogExecutor> primaryExecutor;

    /**
     * Data source configuration
     */
    private DataSource dataSource = new DataSource();

    @Data
    public static class DataSource {
        /**
         * Data source type
         */
        private String type;
        /**
         * Data source driven
         */
        private String driverClassName;
        /**
         * Data source url
         */
        private String url;
        /**
         * Data source username
         */
        private String username;
        /**
         * Data source password
         */
        private String password;
    }
}
